export default (box: HTMLElement) => {

  let x = 0
  let y = 0
  document.body.addEventListener("mousemove", (e) => {

    x = 20 / (document.body.clientWidth / e.clientX) - 10
    y = 20 / (document.body.clientHeight / e.clientY) - 10
    box.style.transform = `rotateY(${x}deg) rotateX(${-y}deg)`
  })
}
